﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EditCompany.aspx.cs" ValidateRequest="false"
    Inherits="NJL.WebManage.Company.EditCompany" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
    <script type="text/javascript">
        function check() {
            var regInt = /^\d+$/; //整数
            var txtSort = document.getElementById("<%=txtSort.ClientID %>").value;
            if (regInt.exec(txtSort) == null) {
                alert("排序只能输入整数");
                return false;
            }
            var servuceContent = document.getElementById("<%= txtTrait.ClientID%>").value;
            var txtName = document.getElementById("<%=txtName.ClientID %>").value;
            if (txtName == "") {
                alert("请输入名称");
                return false;
            }
            //地区选择
            var selectArea = document.getElementById("<%=ddlProvince.ClientID %>");
            if (selectArea != null) {
                if (selectArea.value == "000000") {
                    alert("请选择地区");
                    return false;
                }
            }
            if (txtName.length > 25) {
                alert(" 您输入的名称字数超过25个请重新输入");
                return false;
            }
            var txtIntro = document.getElementById("<%=txtCompanyIntro.ClientID %>").value;
            if (txtIntro.length > 100) {
                alert("简介长度不要超过100个汉字");
                return false;
            }
            if (servuceContent.length > 100) {
                alert("您输入的特色招牌字数超过100个请重新输入");
                return false;
            }
            //页面描述
            var txtDescription = document.getElementById("<%=txtDescription.ClientID %>").value;
            if (txtDescription.length > 100) {
                alert("页面描述内容数超过100个字符请重新输入");
                return false;
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server" enctype="multipart/form-data">
    <div class="gray_bd">
        <div class="table_title">
            编辑-<asp:Literal ID="litTitle" runat="server"></asp:Literal>
            <%
                                
                if (WEBSITE_CODE == "1")
                {
                                
            %>
            <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=<%=Request.QueryString["QQ"] %>&site=qq&menu=yes">
                <img border="0" src="http://wpa.qq.com/pa?p=2:<%=Request.QueryString["QQ"] %>:45"
                    alt="点击这里给我发消息" title="点击这里给我发消息"></a>
            <%
                }
            %>
        </div>
        <div class="pad5px">
            <table align="center" cellspacing="0" style="width: 100%">
                <tr>
                    <td style="width: 120px; text-align: right;">
                        排序：
                    </td>
                    <td>
                        <asp:TextBox ID="txtSort" runat="server" MaxLength="8" Width="50px">0</asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        名称：
                    </td>
                    <td>
                        <asp:TextBox ID="txtName" runat="server" Width="400px" MaxLength="25"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtName"
                            Display="Dynamic" ErrorMessage="请输入内容"></asp:RequiredFieldValidator>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        企业简称：
                    </td>
                    <td>
                        <asp:TextBox ID="txtCompanyNameSms" runat="server" Width="50%" MaxLength="6"></asp:TextBox>最多6个字
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        地区：
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlProvince" runat="server" OnSelectedIndexChanged="ddlProvince_SelectedIndexChanged"
                            AutoPostBack="True">
                        </asp:DropDownList>
                        &nbsp;
                        <asp:DropDownList ID="ddlCity" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlCity_SelectedIndexChanged">
                        </asp:DropDownList>
                        &nbsp;
                        <asp:DropDownList ID="ddlArea" runat="server">
                        </asp:DropDownList>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right; vertical-align: bottom">
                        图片：
                    </td>
                    <td>
                        <asp:FileUpload ID="FileUpload1" runat="server" />&nbsp;&nbsp;<asp:Button ID="Button1"
                            runat="server" Text="上传" OnClick="btnUpload_Click" />
                        请上传600*450尺寸以内的图片
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right; vertical-align: bottom">
                        现有图片：
                    </td>
                    <td>
                        <asp:Image ID="Image1" runat="server" />
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        邮政编码：
                    </td>
                    <td>
                        <asp:TextBox ID="txtPostCode" runat="server" Width="50%" MaxLength="10"></asp:TextBox>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        地址：
                    </td>
                    <td>
                        <asp:TextBox ID="txtAddress" runat="server" Width="50%" MaxLength="100"></asp:TextBox>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        地图地址：
                    </td>
                    <td>
                        <asp:TextBox ID="txtMapAddress" runat="server" Width="50%" MaxLength="100"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="text-align: right;" class="style1">
                        联系人：
                    </td>
                    <td class="style2">
                        <asp:TextBox ID="txtLinkman" runat="server" Width="50%" MaxLength="25"></asp:TextBox>
                    </td>
                    <td class="style2">
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        电话：
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtTel" runat="server" Width="50%" MaxLength="25"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        传真：
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtFax" runat="server" Width="50%" MaxLength="25"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        手机：
                    </td>
                    <td>
                        <asp:TextBox ID="txtPhone" runat="server" Width="50%" MaxLength="11"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        QQ：
                    </td>
                    <td>
                        <asp:TextBox ID="txtQQ" runat="server" Width="50%" MaxLength="10"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        MSN：
                    </td>
                    <td>
                        <asp:TextBox ID="txtMsn" runat="server" Width="50%" MaxLength="100"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        转为：
                    </td>
                    <td align="left">
                        <asp:RadioButtonList ID="rblCompanyOrHolidayVilla" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1">农家乐</asp:ListItem>
                            <asp:ListItem Selected="True" Value="2">度假山庄</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        显示联系方式：
                    </td>
                    <td align="left">
                        <asp:RadioButtonList ID="rblContact" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1">是</asp:ListItem>
                            <asp:ListItem Selected="True" Value="0">否</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        开通预订：
                    </td>
                    <td align="left">
                        <asp:RadioButtonList ID="rblyd" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1">是</asp:ListItem>
                            <asp:ListItem Selected="True" Value="0">否</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        开通代收业务：
                    </td>
                    <td align="left">
                        <asp:RadioButtonList ID="rblIsPay" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1">是</asp:ListItem>
                            <asp:ListItem Selected="True" Value="0">否</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        接收手机短信：
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtSMS" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        简介：
                    </td>
                    <td>
                        <asp:TextBox ID="txtCompanyIntro" runat="server" Width="50%" TextMode="MultiLine"
                            Height="100"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        交通指南：
                    </td>
                    <td>
                        <asp:TextBox ID="txtJTZN" runat="server" Width="50%" TextMode="MultiLine" Height="100"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        特色招牌：
                    </td>
                    <td>
                        <asp:TextBox ID="txtTrait" runat="server" Width="50%" TextMode="MultiLine" Height="100"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        企业介绍：
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtServiceProject" runat="server" TextMode="MultiLine" Height="61px"
                            Width="100%"></asp:TextBox>
                        <script type="text/javascript">
                            CKEDITOR.replace('<%=txtServiceProject.ClientID%>',
                            {
                                filebrowserBrowseUrl: '/ckfinder/ckfinder.html', //启用浏览功能
                                filebrowserImageBrowseUrl: '/ckfinder/ckfinder.html?Type=Images',
                                filebrowserFlashBrowseUrl: '/ckfinder/ckfinder.html?Type=Flash',
                                filebrowserUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files',
                                filebrowserImageUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images',
                                filebrowserFlashUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash'
                            }
                            );
                        </script>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        订票须知：
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtTICKET_NOTICE" runat="server" TextMode="MultiLine" Height="61px"
                            Width="100%"></asp:TextBox>
                        <script type="text/javascript">
                            CKEDITOR.replace('<%=txtTICKET_NOTICE.ClientID%>',
                            {
                                filebrowserBrowseUrl: '/ckfinder/ckfinder.html', //启用浏览功能
                                filebrowserImageBrowseUrl: '/ckfinder/ckfinder.html?Type=Images',
                                filebrowserFlashBrowseUrl: '/ckfinder/ckfinder.html?Type=Flash',
                                filebrowserUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files',
                                filebrowserImageUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images',
                                filebrowserFlashUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash'
                            }
                            );
                        </script>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        页面标题：
                    </td>
                    <td>
                        <asp:TextBox ID="txtTitle" runat="server" Width="100%" MaxLength="50"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        页面关键字：
                    </td>
                    <td>
                        <asp:TextBox ID="txtKeyWords" runat="server" Width="100%" MaxLength="50"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        页面描述：
                    </td>
                    <td>
                        <asp:TextBox ID="txtDescription" runat="server" Height="51px" TextMode="MultiLine"
                            Width="100%"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td colspan="3" style="background-color: #5aa5e4; color: #ffffff; font-weight: bold">
                        审核资质
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        绑定账号
                    </td>
                    <td>
                        <asp:TextBox ID="txtBindUser" runat="server" MaxLength="20"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        诚信认证
                    </td>
                    <td>
                        <asp:CheckBox ID="ckbAudit1" runat="server" Text="开通认证" />
                        <asp:FileUpload runat="server" ID="FileUpload2" />
                        &nbsp;<asp:Button ID="btnUpload2" runat="server" Text="上传" OnClick="btnUpload2_Click" />
                        <a href="<%=GetImageUrl(model.AUDIT_INFO_1) %>" target="_blank">
                            <asp:Image ID="Image2" runat="server" Width="120px" Height="50px" /></a>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        预定授权
                    </td>
                    <td>
                        <asp:CheckBox ID="ckbAudit2" runat="server" Text="开通授权" />
                        <asp:FileUpload ID="FileUpload3" runat="server" />
                        &nbsp;<asp:Button ID="btnUpload3" runat="server" Text="上传" OnClick="btnUpload3_Click" />
                        <a href="<%=GetImageUrl(model.AUDIT_INFO_2) %>" target="_blank">
                            <asp:Image ID="Image3" runat="server" Width="120px" Height="50px" /></a>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        相关资质
                    </td>
                    <td>
                        <asp:CheckBox ID="ckbAudit3" runat="server" Text="开通资质" />
                        <asp:FileUpload ID="FileUpload4" runat="server" />
                        &nbsp;<asp:Button ID="btnUpload4" runat="server" Text="上传" OnClick="btnUpload4_Click" />
                        <a href="<%=GetImageUrl(model.AUDIT_INFO_3) %>" target="_blank">
                            <asp:Image ID="Image4" runat="server" Width="120px" Height="50px" /></a>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td colspan="3" style="background-color: #5aa5e4; color: #ffffff; font-weight: bold">
                        商户注册信息
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        网站编号:
                    </td>
                    <td>
                        <asp:TextBox ID="txtWebSiteId" runat="server" MaxLength="10"></asp:TextBox>(请勿随意修改)
                    </td>
                    <td>
                      
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        管理密码:
                    </td>
                    <td>
                        <asp:TextBox ID="txtWebSitePwd" runat="server" MaxLength="20"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        <asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_Click" Style="height: 21px"
                            Text="提交" Width="40px" OnClientClick="return check()" />
                        &nbsp;<input id="Reset1" type="reset" value="返回" onclick="location.href='CompanyManage.aspx?typeid=<%=Request.QueryString["typeid"] %>&typeName=<%=Request.QueryString["typeName"] %>&Page=<%=Request["Page"] %>'" />
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>
</body>
</html>
